<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<title>Funny Home</title>
	<script src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
	<script>
	$(document).ready(function() {
		$('#login').bind("click",function(){
			var memberInfo = {};
			memberInfo.id = $("#memberId").val();
			memberInfo.pass = $("#memberPass").val();
			var request = $.ajax({
				type:"POST",
				url:"/login",
				data:JSON.stringify(memberInfo),
				contentType: "application/json",
				dataType:"json"
			});
			request.done(function( msg ) {
				if(msg.resultCode == 0) {
					alert("login");
				} else {
					alert("login fail");
				}
			});
			request.fail(function( jqXHR, textStatus ) {
			  alert( "Request failed: " + textStatus );
			});
		});
	});
	</script>
</head>
<body>
	<h1>Funny Home Login</h1>
	<hr></hr>
	ID : <input id="memberId" type="text" size="20"/>
	Pass : <input id="memberPass" type="password" size="20" />
	<button id="login">Login</button>
</body>
</html>